package com.cje.singleton.demo;/**
 * @Auther: ChenJinEn
 * @Date: 2020/8/10 09:27
 * @Description: //TODO
 */

/**
 *@ClassName Demo3
 *@Description TODO 静态内部类方式实现单列
 *@Author checkZH
 *@Date 2020/8/10 9:27
 *@Version 1.0
 */
public class Demo3 {
    private Demo3() {
    }
    public static class SingleTon{
        public static Demo3 demo3 = new Demo3();
    }
    public static synchronized Demo3 getSingleObj(){
        return SingleTon.demo3;
    }
}
